package com.dmap.community.rpc;

import com.dmap.community.rpc.fallback.AuthRemoteFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name = "auth-server", fallback = AuthRemoteFallback.class)
public interface AuthRemote {

    @RequestMapping(value = "/auth/v2/checkToken/{token}", method = RequestMethod.GET)
    public Long checkToken(@PathVariable(value = "token") String token);


    @RequestMapping(value = "auth/v2/checkMobileNum/{phone}", method = RequestMethod.GET)
    public Boolean checkMobileNum(@PathVariable(value = "phone") String phone);
}
